#pragma once
#include "BaseType.h"
#include "Tracer.h"

using namespace libemb;

//汽车
class Car{
DECL_CLASSNAME(Car)
public:
    virtual void run()=0;
};

class TeslaCar:public Car{
DECL_CLASSNAME(TeslaCar) 
public:
    void run() override
    {
        TRACE_DBG_CLASS("I am Tesla Car, I can run!");
    }
};

class AppleCar:public Car{
DECL_CLASSNAME(AppleCar) 
public:
    void run() override
    {
        TRACE_DBG_CLASS("I am Apple Car, I can run!");
    }
};

//飞机
class Plane{
DECL_CLASSNAME(Plane)
public:
    virtual void fly()=0;
};

class TeslaPlane:public Plane{
DECL_CLASSNAME(TeslaPlane) 
public:
void fly() override
    {
        TRACE_DBG_CLASS("I am Tesla Plane, I can fly!");
    }
};

class ApplePlane:public Plane{
DECL_CLASSNAME(ApplePlane) 
public:
void fly() override
    {
        TRACE_DBG_CLASS("I am Apple Plane, I can fly!");
    }
};